<template>
  <div>
    <div class="reco_title">周末去哪玩儿</div>
    <ul>
      <li class="item" v-for="(item, index) of week" :key="index">
        <div class="item_img_wrapper">
          <img class="item_img" :src="item.imgUrl"/>
        </div>
        <div class="item_cont border-bottom"><!--1像素边框的引用 border-botom-->
           <p class="item_title">{{item.title}}</p>
           <p class="item_desc">{{item.desc}}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'HomeWeekend',
  props: {
    week: Array
  }
}
</script>

<style lang="stylus" scoped>
  @import "~styles/mixins.styl"
  .reco_title
    line-height: .7rem
    background:  #eee
    text-indent: .2rem/*缩进*/
  .item_img_wrapper
    overflow: hidden
    height: 0
    padding-bottom: 40%
    .item_img
      width: 100%
  .item_cont
    padding: .1rem
    .item_title
      font-size: .3rem
      ellipsis()
    .item_desc
      margin: .1rem 0
      color: gainsboro
      font-size: .2rem
      ellipsis()
</style>
